﻿var status = 0;
var random = java.lang.Math.floor(Math.random() * 4);
var eff = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
var eff1 = "#fUI/UIWindow2.img/QuestAlarm/BtQ/normal/0#";

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (cm.getMapId() == 180000001) {
            cm.sendOk("很遗憾，您因为违反用户守则被禁止游戏活动，如有异议请联系管理员.")
            cm.dispose();
        } else if (status == 0) {
        var selStr = "";
        selStr += "#L0#" + eff + "#r  升级老公老婆戒指LV1#l\n\n\n";
        selStr += "#L1#" + eff + "#r  升级老公老婆戒指LV2#l\n\n\n";
        selStr += "#L2#" + eff + "#r  升级老公老婆戒指LV3#l\n\n\n";
        selStr += "#L3#" + eff + "#r  升级老公老婆戒指LV4#l\n\n\n";
        selStr += "#L4#" + eff + "#r  升级老公老婆戒指LV5#l\n\n\n";
        selStr += "#L5#" + eff + "#r  升级老公老婆戒指LV6#l\n\n\n";
        selStr += "#L6#" + eff + "#r  升级老公老婆戒指LV7#l\n\n\n";
        selStr += "#L7#" + eff + "#r  升级老公老婆戒指LV8#l\n\n\n";
        selStr += "#L8#" + eff + "#r  升级老公老婆戒指LV9#l\n\n\n";
        selStr += "#L9#" + eff + "#r 升级老公老婆戒指LV10#l\n\n\n";
        selStr += "#L10#" + eff + "#r 升级老公老婆戒指LV11#l\n\n\n";
        selStr += "#L11#" + eff + "#r 升级老公老婆戒指LV12#l\n\n\n";
        selStr += "#L12#" + eff + "#r 升级老公老婆戒指LV13#l\n\n\n";
        selStr += "#L13#" + eff + "#r 升级老公老婆戒指LV14#l\n\n\n";
        selStr += "#L14#" + eff + "#r 升级老公老婆戒指LV15#l\n\n\n";
        selStr += "#L15#" + eff + "#r 升级老公老婆戒指LV16#l\n\n\n";
        selStr += "#L16#" + eff + "#r 升级老公老婆戒指LV17#l\n\n\n";
        selStr += "#L17#" + eff + "#r 升级老公老婆戒指LV18#l\n\n\n";
        selStr += "#L18#" + eff + "#r 升级老公老婆戒指LV19#l\n\n\n";
        selStr += "#L19#" + eff + "#r 升级老公老婆戒指LV20#l\n\n\n";
        selStr += "#L20#" + eff + "#r 升级老公老婆戒指LV21#l\n\n\n";
        selStr += "#L21#" + eff + "#r 升级老公老婆戒指LV22#l\n\n\n";
        selStr += "#L22#" + eff + "#r 升级老公老婆戒指LV23#l\n\n\n";
        selStr += "#L23#" + eff + "#r 升级老公老婆戒指LV24#l\n\n\n";
        selStr += "#L24#" + eff + "#r 升级老公老婆戒指LV25#l\n\n\n";
        selStr += "#L25#" + eff + "#r 升级老公老婆戒指LV26#l\n\n\n";
        selStr += "#L26#" + eff + "#r 升级老公老婆戒指LV27#l\n\n\n";
        selStr += "#L27#" + eff + "#r 升级老公老婆戒指LV28#l\n\n\n";
        selStr += "#L28#" + eff + "#r 升级老公老婆戒指LV29#l\n\n\n";
        selStr += "#L29#" + eff + "#r 升级老公老婆戒指LV30#l\n\n\n";
        selStr += "#L30#" + eff + "#r 升级老公老婆戒指LV31#l\n\n\n";
        selStr += "#L31#" + eff + "#r 升级老公老婆戒指LV32#l\n\n\n";
        selStr += "#L32#" + eff + "#r 升级老公老婆戒指LV33#l\n\n\n";
        selStr += "#L33#" + eff + "#r 升级老公老婆戒指LV34#l\n\n\n";
        selStr += "#L34#" + eff + "#r 升级老公老婆戒指LV35#l\n\n\n";
        selStr += "#L35#" + eff + "#r 升级老公老婆戒指LV36#l\n\n\n";
        selStr += "#L36#" + eff + "#r 升级老公老婆戒指LV37#l\n\n\n";
        selStr += "#L37#" + eff + "#r 升级老公老婆戒指LV38#l\n\n\n";
        selStr += "#L38#" + eff + "#r 升级老公老婆戒指LV39#l\n\n\n";
        selStr += "#L39#" + eff + "#r 升级老公老婆戒指LV40#l\n\n\n";
        selStr += "#L40#" + eff + "#r 升级老公老婆戒指LV41#l\n\n\n";
        selStr += "#L41#" + eff + "#r 升级老公老婆戒指LV42#l\n\n\n";
        selStr += "#L42#" + eff + "#r 升级老公老婆戒指LV43#l\n\n\n";
        selStr += "#L43#" + eff + "#r 升级老公老婆戒指LV44#l\n\n\n";
        selStr += "#L44#" + eff + "#r 升级老公老婆戒指LV45#l\n\n\n";
        selStr += "#L45#" + eff + "#r 升级老公老婆戒指LV46#l\n\n\n";
        selStr += "#L46#" + eff + "#r 升级老公老婆戒指LV47#l\n\n\n";
        selStr += "#L47#" + eff + "#r 升级老公老婆戒指LV48#l\n\n\n";
        selStr += "#L48#" + eff + "#r 升级老公老婆戒指LV49#l\n\n\n";	
		//selStr += "#L2#" + eff + "  道具删除#k#l\r\n\r\n";	
		//selStr += "#L3#" + eff + "#r  答题活动#l\n\n\n";
		//selStr += "#L4#" + eff + "  结婚地图#l\n\n\n";
		//selStr += "#L5#" + eff + "  道具删除#l\r\n\r\n";
		//selStr += "#L6#" + eff + "  装备分解#k#l\n\n\n";
		//selStr += "#L7#" + eff + "#r  竞技积分#k#l\n\n\n";
		//selStr += "#L8#" + eff + "#r  抵用商城#k#l\n\n\n\r\n";
		//selStr += "#L9#" + eff + "#r  数字猜猜猜#k#l\n\n\n";
        cm.sendSimple(selStr);
    } else if (status == 1) {
        switch (selection) {
        case 0:
			cm.dispose();
			cm.dispose();
			cm.openNpc(9900004,"jz1");
            break;
        case 1:
			cm.dispose();
			cm.openNpc(9900004,"jz2");
            break;
        case 2:
			cm.dispose();
			cm.openNpc(9900004,"jz3");
            break;
        case 3:
			cm.dispose();
			cm.openNpc(9900004,"jz4");
            break;
        case 4:
			cm.dispose();
			cm.openNpc(9900004,"jz5");
            break;
        case 5:
			cm.dispose();
			cm.openNpc(9900004,"jz6");
            break;
        case 6:
			cm.dispose();
			cm.openNpc(9900004,"jz7");
            break;
        case 7:
			cm.dispose();
			cm.openNpc(9900004,"jz8");
            break;
        case 8:
			cm.dispose();
			cm.openNpc(9900004,"jz9");
            break;
        case 9:
			cm.dispose();
			cm.openNpc(9900004,"jz10");
            break;
        case 10:
			cm.dispose();
			cm.openNpc(9900004,"jz11");
            break;
        case 11:
			cm.dispose();
			cm.openNpc(9900004,"jz12");
            break;
        case 12:
			cm.dispose();
			cm.openNpc(9900004,"jz13");
            break;
        case 13:
			cm.dispose();
			cm.openNpc(9900004,"jz14");
            break;
        case 14:
			cm.dispose();
			cm.openNpc(9900004,"jz15");
            break;
        case 15:
			cm.dispose();
			cm.openNpc(9900004,"jz16");
            break;
        case 16:
			cm.dispose();
			cm.openNpc(9900004,"jz17");
            break;
        case 17:
			cm.dispose();
			cm.openNpc(9900004,"jz18");
            break;
        case 18:
			cm.dispose();
			cm.openNpc(9900004,"jz19");
            break;
        case 19:
			cm.dispose();
			cm.openNpc(9900004,"jz20");
            break;
        case 20:
			cm.dispose();
			cm.openNpc(9900004,"jz21");
            break;
        case 21:
			cm.dispose();
			cm.openNpc(9900004,"jz22");
            break;
        case 22:
			cm.dispose();
			cm.openNpc(9900004,"jz23");
            break;
        case 23:
			cm.dispose();
			cm.openNpc(9900004,"jz24");
            break;
        case 24:
			cm.dispose();
			cm.openNpc(9900004,"jz25");
            break;
        case 25:
			cm.dispose();
			cm.openNpc(9900004,"jz26");
            break;
        case 26:
			cm.dispose();
			cm.openNpc(9900004,"jz27");
            break;
        case 27:
			cm.dispose();
			cm.openNpc(9900004,"jz28");
            break;
        case 28:
			cm.dispose();
			cm.openNpc(9900004,"jz29");
            break;
        case 29:
			cm.dispose();
			cm.openNpc(9900004,"jz30");
            break;
        case 30:
			cm.dispose();
			cm.openNpc(9900004,"jz31");
            break;
        case 31:
			cm.dispose();
			cm.openNpc(9900004,"jz32");
            break;
        case 32:
			cm.dispose();
			cm.openNpc(9900004,"jz33");
            break;
        case 33:
			cm.dispose();
			cm.openNpc(9900004,"jz34");
            break;
        case 34:
			cm.dispose();
			cm.openNpc(9900004,"jz35");
            break;
        case 35:
			cm.dispose();
			cm.openNpc(9900004,"jz36");
            break;
        case 36:
			cm.dispose();
			cm.openNpc(9900004,"jz37");
            break;
        case 37:
			cm.dispose();
			cm.openNpc(9900004,"jz38");
            break;
        case 38:
			cm.dispose();
			cm.openNpc(9900004,"jz39");
            break;
        case 39:
			cm.dispose();
			cm.openNpc(9900004,"jz40");
            break;
        case 40:
			cm.dispose();
			cm.openNpc(9900004,"jz41");
            break;
        case 41:
			cm.dispose();
			cm.openNpc(9900004,"jz42");
            break;
        case 42:
			cm.dispose();
			cm.openNpc(9900004,"jz43");
            break;
        case 43:
			cm.dispose();
			cm.openNpc(9900004,"jz44");
            break;
        case 44:
			cm.dispose();
			cm.openNpc(9900004,"jz45");
            break;
        case 45:
			cm.dispose();
			cm.openNpc(9900004,"jz46");
            break;
        case 46:
			cm.dispose();
			cm.openNpc(9900004,"jz47");
            break;
        case 47:
			cm.dispose();
			cm.openNpc(9900004,"jz48");
            break;
        case 48:
			cm.dispose();
			cm.openNpc(9900004,"jz49");
            break;
        case 112:
			cm.dispose();
	    cm.openNpc(9900002,"huishou");
            break;
        case 113://充值网站
			cm.dispose();
			cm.openNpc(9070000);	
            break;
        case 114://管理雇佣商店
			cm.dispose();
			if (cm.getMapId() == 680000000) {
				cm.sendOk("你已经在结婚地图了.");
			} else {
				cm.warp(680000000);
				cm
						.sendOk("已经将你传送到结婚地图。\r\n请查看左上角NPC结婚流程.\r\n请带上你的爱人.邀请你的朋友来吧!\r\n祝你新婚快乐!!!");
				break;
			}
            break;
        case 115://累积充值
            cm.dispose();
	    cm.openNpc(9900002,55);
            break;
        case 116://免费10级
		     cm.dispose();
	    cm.openNpc(9900003,503);
         /*   cm.dispose();
            //cm.openWeb("http://www.libaopay.com/buy/?wid=37438");
	    cm.sendOk("已经为您打开赞助网站！");*/
	//if(cm.getPlayer().getLevel() <= 10){
		//cm.gainExp( + 50000);
		//cm.worldMessage("恭喜新玩家"+ cm.getChar().getName() +"在拍卖NPC处领取5W经验");
		//cm.sendOk("恭喜您领取成功,10级下都能在我这里领取经验");
		//}else{
		//cm.sendOk("你的等级大于10");
	//}
	//cm.dispose();
            break;	
      case 117://竞技积分
            cm.dispose();
	    cm.openNpc(9900003,501);
            break;
	  case 118://抵用商场
            cm.dispose();
	    cm.openNpc(9900003,16);
            break;
	  case 119://抵用商场
            cm.dispose();
	    cm.openNpc(9900003,"szccc");
            break;
	}
    }
}